<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>Potential Incompatibilities with Earlier Versions &mdash; PyQt 5.3.2 Reference Guide</title>
    
    <link rel="stylesheet" href="_static/default.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    './',
        VERSION:     '5.3.2',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="_static/jquery.js"></script>
    <script type="text/javascript" src="_static/underscore.js"></script>
    <script type="text/javascript" src="_static/doctools.js"></script>
    <link rel="shortcut icon" href="_static/logo_tn.ico"/>
    <link rel="top" title="PyQt 5.3.2 Reference Guide" href="index.html" />
    <link rel="next" title="Installing PyQt5" href="installation.html" />
    <link rel="prev" title="Introduction" href="introduction.html" /> 
  </head>
  <body>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="installation.html" title="Installing PyQt5"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="introduction.html" title="Introduction"
             accesskey="P">previous</a> |</li>
        <li><a href="index.html">PyQt 5.3.2 Reference Guide</a> &raquo;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="potential-incompatibilities-with-earlier-versions">
<h1>Potential Incompatibilities with Earlier Versions<a class="headerlink" href="#potential-incompatibilities-with-earlier-versions" title="Permalink to this headline">¶</a></h1>
<div class="section" id="pyqt5-v5-3">
<h2>PyQt5 v5.3<a class="headerlink" href="#pyqt5-v5-3" title="Permalink to this headline">¶</a></h2>
<div class="section" id="execution-of-python-slots">
<h3>Execution of Python Slots<a class="headerlink" href="#execution-of-python-slots" title="Permalink to this headline">¶</a></h3>
<p>In previous versions, when a signal was emitted to a Python slot
that was not decorated with <a class="reference internal" href="signals_slots.html#PyQt5.QtCore.pyqtSlot" title="PyQt5.QtCore.pyqtSlot"><tt class="xref py py-func docutils literal"><span class="pre">pyqtSlot()</span></tt></a>, it would not check
that the underlying C++ receiver instance still existed.  This matched the
PyQt4 behaviour at the time that PyQt5 v5.0 was released, but doesn&#8217;t reflect
the standard C++ behaviour.</p>
<p>The lack of a check meant that an object could connect its
<tt class="xref py py-func docutils literal"><span class="pre">destroyed()</span></tt> signal to itself so that it could
monitor when its underlying C++ instance was destroyed.  Unfortunately this
turned out to be a potential source of obscure bugs for more common code.</p>
<p>In this version the check has been introduced - hence creating an
incompatibility for any code that relies on the earlier behaviour.  As a
workaround for this the <tt class="docutils literal"><span class="pre">no_receiver_check</span></tt> argument has been added to
<tt class="xref py py-func docutils literal"><span class="pre">connect()</span></tt> which allows the check to be suppressed
on a per connection basis.</p>
</div>
<div class="section" id="qt-signals-with-default-arguments">
<h3>Qt Signals with Default Arguments<a class="headerlink" href="#qt-signals-with-default-arguments" title="Permalink to this headline">¶</a></h3>
<p>In previous versions Qt signals with default arguments were exposed as multiple
signals each with one additional default argument.  For example
<tt class="docutils literal"><span class="pre">QAbstractButton::clicked(bool</span> <span class="pre">checked</span> <span class="pre">=</span> <span class="pre">false)</span></tt> was exposed as
<tt class="docutils literal"><span class="pre">QAbstractButton::clicked(bool</span> <span class="pre">checked)</span></tt> and <tt class="docutils literal"><span class="pre">QAbstractButton::clicked()</span></tt>
where the former was the default signal.  It was therefore possible to index
the latter by using an empty tuple as the key - although there was no benefit
in doing so.</p>
<p>In this version only the signal with all arguments supplied is exposed.
However the signal&#8217;s <tt class="docutils literal"><span class="pre">emit()</span></tt> method still supports the default argument,
i.e. when used normally the change should not be noticed.</p>
</div>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
            <p class="logo"><a href="index.html">
              <img class="logo" src="_static/logo.png" alt="Logo"/>
            </a></p>
  <h3><a href="index.html">Table Of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">Potential Incompatibilities with Earlier Versions</a><ul>
<li><a class="reference internal" href="#pyqt5-v5-3">PyQt5 v5.3</a><ul>
<li><a class="reference internal" href="#execution-of-python-slots">Execution of Python Slots</a></li>
<li><a class="reference internal" href="#qt-signals-with-default-arguments">Qt Signals with Default Arguments</a></li>
</ul>
</li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="introduction.html"
                        title="previous chapter">Introduction</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="installation.html"
                        title="next chapter">Installing PyQt5</a></p>
<div id="searchbox" style="display: none">
  <h3>Quick search</h3>
    <form class="search" action="search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    <p class="searchtip" style="font-size: 90%">
    Enter search terms or a module, class or function name.
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="installation.html" title="Installing PyQt5"
             >next</a> |</li>
        <li class="right" >
          <a href="introduction.html" title="Introduction"
             >previous</a> |</li>
        <li><a href="index.html">PyQt 5.3.2 Reference Guide</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
        &copy; Copyright 2014 Riverbank Computing Limited.
      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.2.
    </div>
  </body>
</html>